<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function(options) {
			console.log('App Show')
			console.log(options,'options')
			if(options.referrerInfo.extraData){
				let data = options.referrerInfo.extraData
				if(data.code == 'success' && options.path == 'subpages/Ordersettlement/index'){
					uni.navigateTo({
						url:'/subpages/Paymentsuccessful/index'
					})
				}else if(data.code == 'cancel' && options.path == 'subpages/Ordersettlement/index'){
					uni.navigateTo({
						url: '/subpages/orderlist/index?current=' + 0
					})
				}
			}
			
			// 支付成功 输出 { code: 'success' }
			// 支付取消 输出 { code: 'cancel' }
			// 支付失败 输出 { code: 'fail'， errmsg: '微信原生错误'， errMsg: '微信原生错误' }
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-plus/index.scss";
	/*每个页面公共css */
	view{
		box-sizing: border-box;
	}
</style>
